/**
 * Created by XianTao on 2016/11/12
 * <p/>
 * Copyright (c) 2015-2015
 * Apache License
 * Version 2.0, January 2004
 * http://www.apache.org/licenses/
 */
package org.lego.biz.wechat.lechuan.base.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.lego.jpa.base.entity.UUIDWithTimeEntity;

import javax.persistence.*;

/**
 * 用户得礼品记录
 */

@Entity
@Table(name = "le_user_prize")
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
public class UserPrize extends UUIDWithTimeEntity {
    private String openId;    // 用户在微信号里的唯一标识
    private String telephone;   // 用户手机号码
    private String prizeCode;   // 领礼品的关键字
    private String prizeResult; // 从第三方接口返回的获得礼品结果
    @ManyToOne
    @JoinColumn(name = "push_news_id")
    private PushNews pushNews;    // 用户获得礼品的图文

    @Transient
    @JsonProperty
    private String captcha; // 验证码
}
